package br.iars.web.model.api;

import java.io.Serializable;
import java.util.List;

import br.iars.web.exception.PersistenceException;
import br.iars.web.model.entity.GenericEntity;

public interface GenericModel<T extends GenericEntity<PK>, PK extends Comparable<PK>> extends Serializable {

	public abstract List<T> findAll();

	public abstract T findByID(PK id);

	public abstract void insert(T entity) throws PersistenceException;

	public abstract void update(T entity) throws PersistenceException;

	public abstract void remove(PK id) throws PersistenceException;

}